package com.kakarote.examine.mapper;

import com.kakarote.core.entity.BasePage;
import com.kakarote.core.servlet.BaseMapper;
import com.kakarote.examine.entity.BO.SuperExamineSearchBO;
import com.kakarote.examine.entity.PO.Examine;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 审批表 Mapper 接口
 * </p>
 * @author zhangzhiwei
 * @since 2020-11-13
 */
public interface ExamineMapper extends BaseMapper<Examine> {

    BasePage<Examine> listExaminePage(BasePage<Object> parse,
            @Param("isAdmin") boolean isAdmin,
            @Param("userId") Long userId,
            @Param("deptId") String deptId,
            @Param("labelList") List<Integer> labelList);

    Examine getUniqueBizExamine(  @Param("deptId") Long deptId, @Param("label") Integer label);

    List<Examine> selectAllExamineList(@Param("search") String search, @Param("label") Integer label, @Param("isAdmin") boolean isAdmin,
                                       @Param("isPart") boolean isPart, @Param("userId") Long userId, @Param("deptId") Long deptId, @Param("labelList") List<Integer> labelList);

    List<Examine> queryLabelStatusWithSort(@Param("label") Integer label, @Param("status") Integer status, @Param("isAdmin") Boolean isAdmin, @Param("userId") Long userId, @Param("deptId") Long deptId, @Param("deptIds") List<Long> ids);

    List<Examine> querySuperExamineByName(@Param("data") SuperExamineSearchBO superExamineSearchBO, @Param("userId") Long userId, @Param("deptId") Long deptId, @Param("deptIds") List<Long> ids);
}
